package com.industriallogic.blackjack;

public class Card {

	public static enum Suite {
		DIAMOND, SPADE, HEART, CLUB
	};
	
	public static enum Rank {
		
		ACE(1), TWO(2), THREE(3), FOUR(4),FIVE(5),SIX(5),SEVEN(7),EIGHT(8), NINE(9),TEN(10),KING(10), QUEEN(10), JACK(10);
		
		private int value;
		
		private Rank(int value) {
			this.value = value;
		}
		
		public int getValue() {
			return value;
		}
		
	}

	private Rank rank;
	private Suite suite;

	public Card(Rank rank, Suite suite) {
		this.rank = rank;
		this.suite = suite;
	}

	public Rank getRank() {
		return rank;
	}


	public Suite getSuite() {
		return suite;
	}

	public void setSuite(Suite suite) {
		this.suite = suite;
	}

	public boolean equals(Card obj) {
		return obj.getRank() == this.getRank()
				&& obj.getSuite() == this.getSuite();
	}

	public void print() {
		System.out.print("[" + rank + " of " + suite + "] ");

	}

}
